'use client'
import Link from 'next/link';
import { useState } from 'react';

export default function DashboardLayout({

  children, // will be a page or nested layout
}: {
  children: React.ReactNode
}) {
    const [count, setCount] = useState(0);
  return (
     <div className="border-4 border-dashed border-red-500 p-4 m-4 bg-gray-100">
       <div className="mb-4 space-x-4">
            <Link href="/dashboard/about" className="text-blue-500 hover:underline">About</Link>
            <Link href="/dashboard/settings" className="text-blue-500 hover:underline">Settings</Link>
          </div>
          <button onClick={() => {setCount(count + 1)}}>Increment: {count}</button>
        {children}
      </div>

  )
}